﻿using System.Collections.Generic;
namespace PageAdmin.Utils
{
    /// <summary>
    /// 弹出选择界面的数据模型
    /// </summary>
    public class PopupDataClassify
    {
        /// <summary>
        /// 分类备注，用于placeHolder
        /// </summary>
        public string Remark { get; set; }


        /// <summary>
        /// 传递的字段
        /// </summary>
        public string Field{ get; set; }

        /// <summary>
        /// 是否是级联选择
        /// </summary>
        public bool IsCascader { get; set; } = false;


        /// <summary>
        /// 多选是否关联子节点
        /// </summary>
        public bool CheckStrictly { get; set; } = false;


        /// <summary>
        /// 默认选中的值
        /// </summary>
        public int  SelectedValue { get; set; }

        /// <summary>
        /// 选项
        /// </summary>
        public IEnumerable<dynamic> Options { get; set; }

    }

    /// <summary>
    /// 弹出选择界面的数据模型
    /// </summary>
    public class PopupDataSorce
    {
        /// <summary>
        /// 分类集合
        /// </summary>
        public ICollection<PopupDataClassify> Classify { get; set; } = new List<PopupDataClassify>();


        /// <summary>
        /// 分页代码，多级不需要设置
        /// </summary>
        public PageInfo PageInfo { get; set; }

        /// <summary>
        /// 数据源
        /// </summary>
        public IEnumerable<dynamic> Data{ get; set; }


    }
}
